const { Schema, model } = require('mongoose')

const customersSchema = new Schema({
    name: String,
    age: String,
    gender: String,
    tel:String,
    password:String,
    del:{
        type:Boolean,
        default:false
    },
    salesman: {
        type: Schema.Types.ObjectId,
        ref: 'salesmansModel'
    },
    ordersId: [
        {
            type: Schema.Types.ObjectId,
            ref: 'insuresModel'
        },
    ]
}, { versionKey: false });
module.exports.customersModel = model('customersModel', customersSchema, 'customer');



